{% extends 'index/base.html.twig' %}

{% block content %}
   <div class="left">
        <ul>
            {% for entity in pagination %}   
                <li>
                    <a href="{{path('showNews',{id:entity.id})}}"><img src="{{entity.picurl}}" alt="{{entity.name}}"></a>
                    <div class="cont_r">
                        <p class="cont_r_tit"><a href="{{path('showNews',{id:entity.id})}}">{{entity.name}}</a></p>
                        <p class="cont_r_con"><a href="{{path('showNews',{id:entity.id})}}">{{entity.description}}</a></p>
                        <p class="time-more">
                            <span class="time">{{entity.createdAt|date("Y.m.d")}}</span>
                            <span class="more">阅读</span>
                            <span class="many">{{entity.viewsnum}}</span>
                        </p>
                    </div>
                </li>
            {% endfor %}
            
        </ul>
       {{ knp_pagination_render(pagination) }}
    </div>
{% endblock %}